/*
 * Created on Jun 22, 2011
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.timber.util;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author joju.varghese
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class InvetoryDetailBean extends SLDataObjectAdaptor implements Serializable {
	
	/**
	 * @return Returns the auditInformation.
	 */
	public String getAuditInformation() {
		return auditInformation;
	}
	/**
	 * @param auditInformation The auditInformation to set.
	 */
	public void setAuditInformation(String auditInformation) {
		this.auditInformation = auditInformation;
	}
	/**
	 * @return Returns the comments.
	 */
	public String getComments() {
		return comments;
	}
	/**
	 * @param comments The comments to set.
	 */
	public void setComments(String comments) {
		this.comments = comments;
	}
	/**
	 * @return Returns the companyName.
	 */
	public String getCompanyName() {
		return companyName;
	}
	/**
	 * @param companyName The companyName to set.
	 */
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	/**
	 * @return Returns the itemClass.
	 */
	public String getItemClass() {
		return itemClass;
	}
	/**
	 * @param itemClass The itemClass to set.
	 */
	public void setItemClass(String itemClass) {
		this.itemClass = itemClass;
	}
	/**
	 * @return Returns the itemCode.
	 */
	public String getItemCode() {
		return itemCode;
	}
	/**
	 * @param itemCode The itemCode to set.
	 */
	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}
	/**
	 * @return Returns the itemId.
	 */
	public String getItemId() {
		return itemId;
	}
	/**
	 * @param itemId The itemId to set.
	 */
	public void setItemId(String itemId) {
		this.itemId = itemId;
	}
	/**
	 * @return Returns the itemName.
	 */
	public String getItemName() {
		return itemName;
	}
	/**
	 * @param itemName The itemName to set.
	 */
	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	/**
	 * @return Returns the length.
	 */
	public double getLength() {
		return length;
	}
	/**
	 * @param length The length to set.
	 */
	public void setLength(double length) {
		this.length = length;
	}
	/**
	 * @return Returns the location.
	 */
	public String getLocation() {
		return location;
	}
	/**
	 * @param location The location to set.
	 */
	public void setLocation(String location) {
		this.location = location;
	}
	/**
	 * @return Returns the lotNumber.
	 */
	public String getLotNumber() {
		return lotNumber;
	}
	/**
	 * @param lotNumber The lotNumber to set.
	 */
	public void setLotNumber(String lotNumber) {
		this.lotNumber = lotNumber;
	}
	/**
	 * @return Returns the measurement.
	 */
	public double getMeasurement() {
		return measurement;
	}
	/**
	 * @param measurement The measurement to set.
	 */
	public void setMeasurement(double measurement) {
		this.measurement = measurement;
	}
	/**
	 * @return Returns the parent.
	 */
	public String getParent() {
		return parent;
	}
	/**
	 * @param parent The parent to set.
	 */
	public void setParent(String parent) {
		this.parent = parent;
	}
	/**
	 * @return Returns the profitMargin.
	 */
	public double getProfitMargin() {
		return profitMargin;
	}
	/**
	 * @param profitMargin The profitMargin to set.
	 */
	public void setProfitMargin(double profitMargin) {
		this.profitMargin = profitMargin;
	}
	/**
	 * @return Returns the purchasedDate.
	 */
	public String getPurchasedDate() {
		return purchasedDate;
	}
	/**
	 * @param purchasedDate The purchasedDate to set.
	 */
	public void setPurchasedDate(String purchasedDate) {
		this.purchasedDate = purchasedDate;
	}
	/**
	 * @return Returns the purchasedFrom.
	 */
	public String getPurchasedFrom() {
		return purchasedFrom;
	}
	/**
	 * @param purchasedFrom The purchasedFrom to set.
	 */
	public void setPurchasedFrom(String purchasedFrom) {
		this.purchasedFrom = purchasedFrom;
	}
	/**
	 * @return Returns the purchasePrice.
	 */
	public double getPurchasePrice() {
		return purchasePrice;
	}
	/**
	 * @param purchasePrice The purchasePrice to set.
	 */
	public void setPurchasePrice(double purchasePrice) {
		this.purchasePrice = purchasePrice;
	}
	/**
	 * @return Returns the quantity.
	 */
	public double getQuantity() {
		return quantity;
	}
	/**
	 * @param quantity The quantity to set.
	 */
	public void setQuantity(double quantity) {
		this.quantity = quantity;
	}
	/**
	 * @return Returns the salesPrice.
	 */
	public double getSalesPrice() {
		return salesPrice;
	}
	/**
	 * @param salesPrice The salesPrice to set.
	 */
	public void setSalesPrice(double salesPrice) {
		this.salesPrice = salesPrice;
	}
	/**
	 * @return Returns the tax.
	 */
	public double getTax() {
		return tax;
	}
	/**
	 * @param tax The tax to set.
	 */
	public void setTax(double tax) {
		this.tax = tax;
	}
	/**
	 * @return Returns the type.
	 */
	public String getType() {
		return type;
	}
	/**
	 * @param type The type to set.
	 */
	public void setType(String type) {
		this.type = type;
	}
	/**
	 * @return Returns the width.
	 */
	public double getWidth() {
		return width;
	}
	/**
	 * @param width The width to set.
	 */
	public void setWidth(double width) {
		this.width = width;
	}
	String		itemId			;  				
	String		parent			;             	
	String		type			;              
	String		itemCode	 	;            	
	String		itemName	 	;          	
	String		itemClass    	;  			
	String		location      	;          
	String		lotNumber      	;			
	double		length          ; 		
	double		width          	;		
	double		measurement     ;    	
	double		quantity        ;		
	double		purchasePrice   ;		
	double		salesPrice      ;	
	double		profitMargin    ;	
	String		purchasedFrom	;	
	String		purchasedDate   ;	
	double		tax            	;	
	String		auditInformation;	
	String		comments        ;	
	String		companyName    	;	
	String ITEMID    		="ItemId"			;
	String	PARENT			="Parent"           ;   
	String	TYPE			="Type"             ;   
	String	ITEMCODE		 ="ItemCode"        ;	
	String	ITEMNAME		 ="ItemName"        ;	
	String	ITEMCLASS		= "ItemClass"		;	
	String	LOCATION		="Location"         ;	
	String	LOTNUMBER		="LotNumber" 		;	
	String	LENGTH			 ="Length"  		;	
	String	WIDTH          	="Width"			;	
	String	MEASUREMENT     ="Measurement"    	;	
	String	QUANTITY        ="Quantity"			;	
	String	PURCHASEPRICE   ="PurchasePrice" 	;	
	String	SALESPRICE      ="SalesPrice"		;	
	String	PROFITMARGIN    ="ProfitMargin"   	;	
	String	PURCHASEDFROM	="PurchasedFrom"	;	
	String	PURCHASEDDATE    ="PurchasedDate"	;	
	String	TAX            	="Tax"				;	
	String	AUDITINFORMATION ="AuditInformation";
	String	COMMENTS        ="Comments"			;
	String	COMPANYNAME    	="CompanyName"		;
	
	
	public boolean load(ResultSet rs) throws SQLException
	{

		 itemId=rs.getString(ITEMID);     
		 type=rs.getString(TYPE); 
		 itemCode	=rs.getString(ITEMCODE);
		 itemName	=rs.getString(ITEMNAME);
		 itemClass	=rs.getString(ITEMCLASS);
		 location	=rs.getString(LOCATION);
		 lotNumber	=rs.getString(LOTNUMBER);
		 length =rs.getDouble(LENGTH);
		 width =rs.getDouble(WIDTH);
		 measurement =rs.getDouble(MEASUREMENT);
		 purchasePrice =rs.getDouble(PURCHASEPRICE);
		 salesPrice = rs.getDouble(SALESPRICE);
		 profitMargin = rs.getDouble(PROFITMARGIN);
		 purchasedFrom = rs.getString(PURCHASEDFROM);
		 salesPrice = rs.getDouble(SALESPRICE);
		 purchasedDate =rs.getDate(PURCHASEDDATE)+"";
		 salesPrice = rs.getDouble(SALESPRICE);
		 tax = rs.getDouble(TAX);
		 salesPrice = rs.getDouble(SALESPRICE);
		return true;
	}
	
}
